using System;
using Newtonsoft.Json;

namespace FBGraph.Models
{
    /// <summary>A user profile.</summary>
    /// <remarks>
    /// <para>Example: https://graph.facebook.com/arjun (Arjun Banker)</para>
    /// </remarks>
    public partial class User : IFBGraphResult
    {
        /// <summary>The user's ID</summary>
        [JsonPropertyAttribute("id")]
        public Int64 Id { get; set; }
        
        /// <summary>The user's first name</summary>
        [JsonPropertyAttribute("first_name")]
        public String FirstName { get; set; }
        
        /// <summary>The user's last name</summary>
        [JsonPropertyAttribute("last_name")]
        public String LastName { get; set; }
        
        /// <summary>The user's full name</summary>
        [JsonPropertyAttribute("name")]
        public String Name { get; set; }
        
        /// <summary>A link to the user's profile</summary>
        [JsonPropertyAttribute("link")]
        public String Link { get; set; }
        
        /// <summary>The user's blurb that appears under their profile picture</summary>
        [JsonPropertyAttribute("about")]
        public String About { get; set; }
        
        /// <summary>The user's birthday</summary>
        [JsonPropertyAttribute("birthday")]
        public DateTime Birthday { get; set; }
        
        /// <summary>A list of the work history from the user's profile</summary>
        [JsonPropertyAttribute("work")]
        public UserWork[] Work { get; set; }
        
        /// <summary>A list of the education history from the user's profile</summary>
        [JsonPropertyAttribute("education")]
        public UserEducation[] Education { get; set; }
        
        /// <summary>The proxied or contact email address granted by the user</summary>
        [JsonPropertyAttribute("email")]
        public String Email { get; set; }
        
        /// <summary>A link to the user's personal website.</summary>
        [JsonPropertyAttribute("website")]
        public String Website { get; set; }
        
        /// <summary>The user's hometown</summary>
        [JsonPropertyAttribute("hometown")]
        public UserHometown Hometown { get; set; }
        
        /// <summary>The user's current location</summary>
        [JsonPropertyAttribute("location")]
        public Location Location { get; set; }
        
        /// <summary>The user's gender</summary>
        [JsonPropertyAttribute("gender")]
        public String Gender { get; set; }
        
        /// <summary>Genders the user is interested in</summary>
        [JsonPropertyAttribute("interested_in")]
        public Object InterestedIn { get; set; }
        
        /// <summary>Types of relationships the user is seeking</summary>
        [JsonPropertyAttribute("meeting_for")]
        public Object MeetingFor { get; set; }
        
        /// <summary>The user's relationship status</summary>
        [JsonPropertyAttribute("relationship_status")]
        public String RelationshipStatus { get; set; }
        
        /// <summary>The user's political view</summary>
        [JsonPropertyAttribute("political")]
        public String Political { get; set; }
        
        /// <summary>The user's account verification status</summary>
        [JsonPropertyAttribute("verified")]
        public Boolean Verified { get; set; }
        
        /// <summary>The user's significant other</summary>
        [JsonPropertyAttribute("significant_other")]
        public Object SignificantOther { get; set; }
        
        /// <summary>The user's timezone</summary>
        [JsonPropertyAttribute("timezone")]
        public Int64 Timezone { get; set; }
        
        /// <summary>The time the user last updated their profile</summary>
        [JsonPropertyAttribute("updated_time")]
        public DateTime UpdatedTime { get; set; }
        
        /// <summary>The user's middle name</summary>
        [JsonPropertyAttribute("middle_name")]
        public String MiddleName { get; set; }
        
        /// <summary>The user's religion</summary>
        [JsonPropertyAttribute("religion")]
        public String Religion { get; set; }
        
        /// <summary>Gets or sets a <see cref="Boolean" /> value representing whether the object has been populated.</summary>
        Boolean IFBGraphResult.IsReady { get; set; }
        
        /// <summary>Updates the current model with values from another like-typed model.</summary>
        /// <param name="other">The source model.</param>
        /// <remarks>This is used for asynchronous calls to update the reference that was returned when the original API method was called.</remarks>
        void IFBGraphResult.UpdateFrom(IFBGraphResult other)
        {
            var that = other as User;
            if (that == null) return;
            else
            {
                this.Id = that.Id;
                this.FirstName = that.FirstName;
                this.LastName = that.LastName;
                this.Name = that.Name;
                this.Link = that.Link;
                this.About = that.About;
                this.Birthday = that.Birthday;
                this.Work = that.Work;
                this.Education = that.Education;
                this.Email = that.Email;
                this.Website = that.Website;
                this.Hometown = that.Hometown;
                this.Location = that.Location;
                this.Gender = that.Gender;
                this.InterestedIn = that.InterestedIn;
                this.MeetingFor = that.MeetingFor;
                this.RelationshipStatus = that.RelationshipStatus;
                this.Political = that.Political;
                this.Verified = that.Verified;
                this.SignificantOther = that.SignificantOther;
                this.Timezone = that.Timezone;
                this.UpdatedTime = that.UpdatedTime;
                this.MiddleName = that.MiddleName;
                this.Religion = that.Religion;
                ((IFBGraphResult)this).IsReady = true;
            }
            
        }
        
        /// <summary>Contains information about a period of employment for a user.</summary>
        public partial class UserWork
        {
            /// <summary>A <see cref="UserWorkEmployer" /> object representing an employer that a user worked for</summary>
            [JsonPropertyAttribute("employer")]
            public UserWorkEmployer Employer { get; set; }
            
            /// <summary>A <see cref="Location" /> object describing the location of employment</summary>
            [JsonPropertyAttribute("location")]
            public Location Location { get; set; }
            
            /// <summary>A <see cref="UserWorkPosition" /> object representing a position a user held at a place of employment.</summary>
            [JsonPropertyAttribute("position")]
            public UserWorkPosition Position { get; set; }
            
            /// <summary>The date a user ended employment</summary><remarks>The format of this value does not appear to be standardized.</remarks>
            [JsonPropertyAttribute("end_date")]
            public String EndDate { get; set; }
            
            /// <summary>The date a user started employment</summary><remarks>The format of this value does not appear to be standardized.</remarks>
            [JsonPropertyAttribute("start_date")]
            public String StartDate { get; set; }
            
            
            /// <summary>Contains information about an employer.</summary>
            public partial class UserWorkEmployer
            {
                /// <summary>The Graph API identifier of the employer</summary>
                [JsonPropertyAttribute("id")]
                public Int64 Id { get; set; }
                
                /// <summary>The name of the employer</summary>
                [JsonPropertyAttribute("name")]
                public String Name { get; set; }
            }
            
            
            /// <summary>Contains information about a specific position at a place of employment</summary>
            public partial class UserWorkPosition
            {
                /// <summary>The Graph API identifier of the position</summary>
                [JsonPropertyAttribute("id")]
                public Int64 Id { get; set; }
                
                /// <summary>The name of the position</summary>
                [JsonPropertyAttribute("name")]
                public String Name { get; set; }
            }
        }
        
        
        /// <summary>Contains information about an education institution a user attended.</summary>
        public partial class UserEducation
        {
            /// <summary>A <see cref="UserEducationSchool" /> object representing the educational institution that the user attended.</summary>
            [JsonPropertyAttribute("school")]
            public UserEducationSchool School { get; set; }
            
            /// <summary>A <see cref="UserEducationYear" /> object representing a user's graducation year at an education institution</summary>
            [JsonPropertyAttribute("year")]
            public UserEducationYear Year { get; set; }
            
            /// <summary>A <see cref="UserEducationConcentration" /> object representing the user's area of concentration</summary>
            [JsonPropertyAttribute("concentration")]
            public UserEducationConcentration[] Concentration { get; set; }
            
            /// <summary>A <see cref="UserEducationDegree" /> object representing the degree that the user earned at an educational institution</summary>
            [JsonPropertyAttribute("degree")]
            public UserEducationDegree Degree { get; set; }
            
            
            /// <summary>Contains information about an educational institution that a user has attended.</summary>
            public partial class UserEducationSchool
            {
                /// <summary>The Graph API id of the school</summary>
                [JsonPropertyAttribute("id")]
                public Int64 Id { get; set; }
                
                /// <summary>The name of the school</summary>
                [JsonPropertyAttribute("name")]
                public String Name { get; set; }
            }
            
            
            /// <summary>Contains information about a graduation year.</summary>
            public partial class UserEducationYear
            {
                /// <summary>The Graph API id of the graduation year</summary>
                [JsonPropertyAttribute("id")]
                public Int64 Id { get; set; }
                
                /// <summary>The name of the graduation year</summary>
                [JsonPropertyAttribute("name")]
                public Int64 Name { get; set; }
            }
            
            
            /// <summary>Contains information about a user's area of concentration at an education institution.</summary>
            public partial class UserEducationConcentration
            {
                /// <summary>The Graph API identifier of the area of concentration</summary>
                [JsonPropertyAttribute("id")]
                public Int64 Id { get; set; }
                
                /// <summary>The name of the area of concentration</summary>
                [JsonPropertyAttribute("name")]
                public String Name { get; set; }
            }
            
            
            /// <summary>Contains information about a degree a user earned at an educational institution.</summary>
            public partial class UserEducationDegree
            {
                /// <summary>The Graph API id of the degree</summary>
                [JsonPropertyAttribute("id")]
                public Int64 Id { get; set; }
                
                /// <summary>The name of the degree</summary>
                [JsonPropertyAttribute("name")]
                public String Name { get; set; }
            }
        }
        
        
        /// <summary>Contains information about a user's hometown.</summary>
        public partial class UserHometown
        {
            /// <summary>The Graph API id of the hometown</summary>
            [JsonPropertyAttribute("id")]
            public Nullable<Int64> Id { get; set; }
            
            /// <summary>The name of the hometown</summary>
            [JsonPropertyAttribute("name")]
            public String Name { get; set; }
        }
    }
}